<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: Origami::Page</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">Origami::Page</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../files/origami/page_rb.html">
                origami/page.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                <a href="Dictionary.html">
                Dictionary
               </a>
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">

    <div id="description">
      <p>
Class representing a <a href="Page.html">Page</a> in the <a
href="PDF.html">PDF</a> document.
</p>

    </div>


   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000665">add_annot</a>&nbsp;&nbsp;
      <a href="#M000667">add_flash_application</a>&nbsp;&nbsp;
      <a href="#M000666">each_annot</a>&nbsp;&nbsp;
      <a href="#M000663">new</a>&nbsp;&nbsp;
      <a href="#M000669">onClose</a>&nbsp;&nbsp;
      <a href="#M000668">onOpen</a>&nbsp;&nbsp;
      <a href="#M000664">pre_build</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->
    <div id="includes">
      <h3 class="section-bar">Included Modules</h3>

      <div id="includes-list">
        <span class="include-name">StandardObject</span>
        <span class="include-name"><a href="ResourcesHolder.html">ResourcesHolder</a></span>
      </div>
    </div>

    <div id="section">


    <div id="constants-list">
      <h3 class="section-bar">Constants</h3>

      <div class="name-list">
        <table summary="Constants">
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">Resources</td>
          <td>=</td>
          <td class="context-item-value">Resources.new.pre_build unless self.has_key?(:Resources)</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">O</td>
          <td>=</td>
          <td class="context-item-value">action</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">C</td>
          <td>=</td>
          <td class="context-item-value">action</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">NA</td>
          <td>=</td>
          <td class="context-item-value">action</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">PA</td>
          <td>=</td>
          <td class="context-item-value">action</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">Params</td>
          <td>=</td>
          <td class="context-item-value">Annotation::RichMedia::Parameters.new</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">Binding</td>
          <td>=</td>
          <td class="context-item-value">Annotation::RichMedia::Parameters::Binding::BACKGROUND</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">FlashVars</td>
          <td>=</td>
          <td class="context-item-value">params[:flash_vars]</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">Asset</td>
          <td>=</td>
          <td class="context-item-value">content</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">Instances</td>
          <td>=</td>
          <td class="context-item-value">[ rminstance ]</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">Subtype</td>
          <td>=</td>
          <td class="context-item-value">type</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">RichMediaContent</td>
          <td>=</td>
          <td class="context-item-value">Annotation::RichMedia::Content.new.set_indirect(true)</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">Assets</td>
          <td>=</td>
          <td class="context-item-value">NameTreeNode.new</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">Names</td>
          <td>=</td>
          <td class="context-item-value">NameLeaf.new(content.F.value =&gt; content)</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">Configurations</td>
          <td>=</td>
          <td class="context-item-value">[ rmconfig ]</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">RichMediaSettings</td>
          <td>=</td>
          <td class="context-item-value">Annotation::RichMedia::Settings.new</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">Activation</td>
          <td>=</td>
          <td class="context-item-value">Annotation::RichMedia::Activation.new</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">Condition</td>
          <td>=</td>
          <td class="context-item-value">params[:activation]</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">Configuration</td>
          <td>=</td>
          <td class="context-item-value">rmconfig</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">Animation</td>
          <td>=</td>
          <td class="context-item-value">Annotation::RichMedia::Animation.new(:PlayCount =&gt; -1, :Subtype =&gt; :Linear, :Speed =&gt; 1.0)</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">Presentation</td>
          <td>=</td>
          <td class="context-item-value">Annotation::RichMedia::Presentation.new</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">Style</td>
          <td>=</td>
          <td class="context-item-value">Annotation::RichMedia::Presentation::WINDOWED if params[:windowed]</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">Transparent</td>
          <td>=</td>
          <td class="context-item-value">params[:transparent]</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">NavigationPane</td>
          <td>=</td>
          <td class="context-item-value">params[:navigation_pane]</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">Toolbar</td>
          <td>=</td>
          <td class="context-item-value">params[:toolbar]</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">PassContextClick</td>
          <td>=</td>
          <td class="context-item-value">params[:pass_context_click]</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">Deactivation</td>
          <td>=</td>
          <td class="context-item-value">Annotation::RichMedia::Deactivation.new</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">Condition</td>
          <td>=</td>
          <td class="context-item-value">params[:deactivation]</td>
        </tr>
        </table>
      </div>
    </div>



      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Class methods</h3>

      <div id="method-M000663" class="method-detail">
        <a name="M000663"></a>

        <div class="method-heading">
          <a href="#M000663" class="method-signature">
          <span class="method-name">new</span><span class="method-args">(hash = {})</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000663-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000663-source">
<pre>
     <span class="ruby-comment cmt"># File origami/page.rb, line 374</span>
374:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">hash</span> = {})
375:       <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">hash</span>)
376:       
377:       <span class="ruby-identifier">set_indirect</span>(<span class="ruby-keyword kw">true</span>)
378:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000665" class="method-detail">
        <a name="M000665"></a>

        <div class="method-heading">
          <a href="#M000665" class="method-signature">
          <span class="method-name">add_annot</span><span class="method-args">(*annotations)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Add an <a href="Annotation.html">Annotation</a> to the <a
href="Page.html">Page</a>.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000665-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000665-source">
<pre>
     <span class="ruby-comment cmt"># File origami/page.rb, line 389</span>
389:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_annot</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">annotations</span>)
390:       <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">annotations</span>.<span class="ruby-identifier">all?</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">annot</span><span class="ruby-operator">|</span> <span class="ruby-identifier">annot</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Annotation</span>) <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">annot</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Reference</span>)}
391:         <span class="ruby-identifier">raise</span> <span class="ruby-constant">TypeError</span>, <span class="ruby-value str">&quot;Only Annotation objects must be passed.&quot;</span>
392:       <span class="ruby-keyword kw">end</span>
393:       
394:       <span class="ruby-keyword kw">self</span>.<span class="ruby-constant">Annots</span> <span class="ruby-operator">||=</span> []
395: 
396:       <span class="ruby-identifier">annotations</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">annot</span><span class="ruby-operator">|</span> 
397:         <span class="ruby-identifier">annot</span>.<span class="ruby-identifier">solve</span>[<span class="ruby-identifier">:P</span>] = <span class="ruby-keyword kw">self</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">is_indirect?</span>
398:         <span class="ruby-keyword kw">self</span>.<span class="ruby-constant">Annots</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">annot</span> 
399:       <span class="ruby-keyword kw">end</span>
400:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000667" class="method-detail">
        <a name="M000667"></a>

        <div class="method-heading">
          <a href="#M000667" class="method-signature">
          <span class="method-name">add_flash_application</span><span class="method-args">(swfspec, params = {})</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Embed a SWF Flash application in the page.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000667-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000667-source">
<pre>
     <span class="ruby-comment cmt"># File origami/page.rb, line 417</span>
417:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_flash_application</span>(<span class="ruby-identifier">swfspec</span>, <span class="ruby-identifier">params</span> = {})
418:       <span class="ruby-identifier">options</span> =
419:       {
420:         <span class="ruby-identifier">:windowed</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">false</span>,
421:         <span class="ruby-identifier">:transparent</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">false</span>,
422:         <span class="ruby-identifier">:navigation_pane</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">false</span>,
423:         <span class="ruby-identifier">:toolbar</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">false</span>,
424:         <span class="ruby-identifier">:pass_context_click</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">false</span>,
425:         <span class="ruby-identifier">:activation</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">Annotation</span><span class="ruby-operator">::</span><span class="ruby-constant">RichMedia</span><span class="ruby-operator">::</span><span class="ruby-constant">Activation</span><span class="ruby-operator">::</span><span class="ruby-constant">PAGE_OPEN</span>,
426:         <span class="ruby-identifier">:deactivation</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">Annotation</span><span class="ruby-operator">::</span><span class="ruby-constant">RichMedia</span><span class="ruby-operator">::</span><span class="ruby-constant">Deactivation</span><span class="ruby-operator">::</span><span class="ruby-constant">PAGE_CLOSE</span>,
427:         <span class="ruby-identifier">:flash_vars</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">nil</span>
428:       }
429:       <span class="ruby-identifier">options</span>.<span class="ruby-identifier">update</span>(<span class="ruby-identifier">params</span>)
430:     
431:       <span class="ruby-identifier">annot</span> = <span class="ruby-identifier">create_richmedia</span>(<span class="ruby-identifier">:Flash</span>, <span class="ruby-identifier">swfspec</span>, <span class="ruby-identifier">options</span>)
432:       <span class="ruby-identifier">add_annot</span>(<span class="ruby-identifier">annot</span>)
433: 
434:       <span class="ruby-identifier">annot</span>
435:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000666" class="method-detail">
        <a name="M000666"></a>

        <div class="method-heading">
          <a href="#M000666" class="method-signature">
          <span class="method-name">each_annot</span><span class="method-args">(&amp;b)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Iterate through each <a href="Annotation.html">Annotation</a> of the <a
href="Page.html">Page</a>.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000666-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000666-source">
<pre>
     <span class="ruby-comment cmt"># File origami/page.rb, line 405</span>
405:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each_annot</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">b</span>)
406:       <span class="ruby-identifier">annots</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-constant">Annots</span>
407:       <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">annots</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>)
408: 
409:       <span class="ruby-identifier">annots</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">annot</span><span class="ruby-operator">|</span>
410:         <span class="ruby-identifier">b</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">annot</span>.<span class="ruby-identifier">solve</span>) 
411:       <span class="ruby-keyword kw">end</span>
412:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000669" class="method-detail">
        <a name="M000669"></a>

        <div class="method-heading">
          <a href="#M000669" class="method-signature">
          <span class="method-name">onClose</span><span class="method-args">(action)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Will execute an action when the page is closed.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000669-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000669-source">
<pre>
     <span class="ruby-comment cmt"># File origami/page.rb, line 454</span>
454:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">onClose</span>(<span class="ruby-identifier">action</span>)
455:       <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">action</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Action</span>) <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">action</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Reference</span>)
456:         <span class="ruby-identifier">raise</span> <span class="ruby-constant">TypeError</span>, <span class="ruby-value str">&quot;An Action object must be passed.&quot;</span>
457:       <span class="ruby-keyword kw">end</span>
458:       
459:       <span class="ruby-keyword kw">self</span>.<span class="ruby-constant">AA</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">PageAdditionalActions</span>.<span class="ruby-identifier">new</span>
460:       <span class="ruby-keyword kw">self</span>.<span class="ruby-constant">AA</span>.<span class="ruby-constant">C</span> = <span class="ruby-identifier">action</span>
461: 
462:       <span class="ruby-keyword kw">self</span>
463:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000668" class="method-detail">
        <a name="M000668"></a>

        <div class="method-heading">
          <a href="#M000668" class="method-signature">
          <span class="method-name">onOpen</span><span class="method-args">(action)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Will execute an action when the page is opened.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000668-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000668-source">
<pre>
     <span class="ruby-comment cmt"># File origami/page.rb, line 440</span>
440:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">onOpen</span>(<span class="ruby-identifier">action</span>)
441:       <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">action</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Action</span>) <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">action</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Reference</span>)
442:         <span class="ruby-identifier">raise</span> <span class="ruby-constant">TypeError</span>, <span class="ruby-value str">&quot;An Action object must be passed.&quot;</span>
443:       <span class="ruby-keyword kw">end</span>
444:       
445:       <span class="ruby-keyword kw">self</span>.<span class="ruby-constant">AA</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">PageAdditionalActions</span>.<span class="ruby-identifier">new</span>
446:       <span class="ruby-keyword kw">self</span>.<span class="ruby-constant">AA</span>.<span class="ruby-constant">O</span> = <span class="ruby-identifier">action</span>
447:       
448:       <span class="ruby-keyword kw">self</span>
449:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000664" class="method-detail">
        <a name="M000664"></a>

        <div class="method-heading">
          <a href="#M000664" class="method-signature">
          <span class="method-name">pre_build</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000664-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000664-source">
<pre>
     <span class="ruby-comment cmt"># File origami/page.rb, line 380</span>
380:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pre_build</span>
381:       <span class="ruby-keyword kw">self</span>.<span class="ruby-constant">Resources</span> = <span class="ruby-constant">Resources</span>.<span class="ruby-identifier">new</span>.<span class="ruby-identifier">pre_build</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">:Resources</span>)
382: 
383:       <span class="ruby-keyword kw">super</span>
384:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>